package screen;

import framework.Key;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.KeyEvent;

import framework.Util;
import framework.Screen;
import game.Global;

public class TitleScreen extends Screen {

    private Image title;
    private Image back;

    public TitleScreen() {
        //title = Util.loadImage(Global.IMG_TITLE);
        back = Util.loadImage(Global.IMG_TITLE_BACK);

    }

    public void paint(Graphics g) {

        g.drawImage(back, 0, 0, null);


    }

    public void update() {

        //Controles
        if (Key.isDown(KeyEvent.VK_D) || Key.isDown(KeyEvent.VK_ENTER)) {
            // iniciar jogo
            Screen.setCurrentScreen(new GameIntrodutionScreen());
        } else if (Key.isDown(KeyEvent.VK_ESCAPE)) {
            // sair do jogo
            System.exit(0);
        } else if (Key.isDown(KeyEvent.VK_C)) {

            //Creditos
            Screen.setCurrentScreen(new CreditosScreen());
        } else if (Key.isDown(KeyEvent.VK_H)) {
            //Help
            Screen.setCurrentScreen(new HelpScreen());
        }
    }
}
